1. Field of the Invention
The present invention relates to an apparatus and method of decoding encoded data using MPEG (Moving Picture Experts Group) which is an international standard for compressing and decoding digital video data. More particularly, the present invention relates to an apparatus for decoding the video data using an optical disk, an optical magnetic disk, and a digital video cassette recorder (DVCR) tape and to an apparatus and method usable in systems such as an asynchronous transfer mode (ATM) and a satellite-broadcast. The present application is based upon Korean Application No. 3411/1996, which is incorporated herein by the reference.
2. Description of the Related Art
FIG. 1 illustrates a block diagram of an MPEG video data decoder known in the prior art. In this device, an input bit stream compressed in the MPEG format is generally transmitted by an external processor controlling the MPEG video decoder. The input bit stream is stored in the bit stream buffer of an external memory 50 after passing through an encoded data input unit 10 and a memory interface unit 40. In the prior art, a special dynamic random access memory refresh is necessary because a cheap DRAM is generally used in the external memory 50. The DRAM processing speed is lower than that of a static random access memory (SRAM). The input bit stream is read by the bit stream buffer of the external memory 50 and input into a data decoding unit 20. Then, an actual MPEG video decoding operation is performed. The digital video data decoded through the above process is recorded in a frame buffer of the external memory 50 after passing through the memory interface unit 40. In MPEG video decoding operations, certain forms of image data cannot be decoded without reading and referring to digital video data decoded and recorded in the frame buffer, which is accessed through the memory interface unit. Consequently, the data stored in the external memory must be read frequently. The decoded digital video data, which is recorded in the frame buffer through the operation described above, is output after being read by a digital video output unit 30 at a predetermined time. The output of the data decoding unit 20 is made with reference to the frame buffer of the external memory 50. This is because the sequence of the video frames to be ideally decoded is different from that of the video frames actually displayed in the MPEG video, and the time when the video frames are decoded is not the same as the time when they should actually be displayed. Therefore, an apparatus such as the frame buffer of the external memory 50 is necessary to help the digital video output unit 30 output the data into its original form by controlling frame order and timing. The data which is referred to for decoding other frames should be kept in the digital video data form for a predetermined time in order to decode dependent frames into its original form even though reference frames have already passed through the digital video output unit. In short, the encoded data input unit 10, the data decoding unit 20, and the digital video output unit 30 work independently and in parallel at the same time using the external memory 50 through the memory interface unit 40.
FIG. 2 illustrates a diagram showing the concept of images I, P, and B according to the definition of the MPEG. An image I, which is encoded using only the information of the image itself, can be decoded without reference to other images. However, an image P must be decoded with reference to another frame in a forward prediction sequence because the image P is an output of encoded image data I or P through forward prediction to produce the best picture quality. An image B also cannot be decoded without reference to other image frames. In the case of B images, two kinds of image data used in a two-way prediction are referenced because the image B is an output of encoded past s and future images (I and P) data through two-way prediction. Therefore, the frame buffer of FIG. 1 stores the digital data of three types of frames which are used in decoding as well as in outputting the data.
FIG. 3 illustrates a diagram of an image construction of MPEG data according to the National Television System Committee (NTSC). General MPEG data for one second is divided into the images I, B, and P. Thirty frames are displayed for one second and comprise 2 frames of image I, 8 frames of image P, and 20 frames of image B. The image B occupy the most frames, and as set forth above, the image B needs two frames in order to decode the data. Consequently, frequent operations of reading and writing the frame buffer of the external memory through the memory interface are required. In case the fast forward play or fast reverse play mode is activated in a video cassette recorder (VCR) for example, only the images I in random access memory are displayed and realized in general. Because the image I is encoded independently and can be decoded with only the information of the image itself, the image I can be decoded even though other images have not been decoded yet. As the processing speed is improved, the image P as well as the image I can be displayed and realized in the case of a faster play because the image P needs only one decoded reference frame.
The performance of the MPEG video decoder is determined based on how much bit stream it can decode, or how fast the decoder can receive the input data. In the construction of FIG. 1, the encoded data input unit 10, the data decoding unit 20, and the digital video output unit 30, work independently and simultaneously and use the same external memory through the same memory interface unit 40. In such a construction, the performance of the MPEG video decoder is influenced by the efficient use of the memory interface unit 40. In general, more frequent access to the external memory 50 lowers the performance of the MPEG video decoder. In the present invention, not all the input data, only the image I or the images I and P are decoded for display in case of the fast play.
In the prior art, however, unnecessary data (image B or P) is also recorded in the bit stream buffer of the external memory 50. The data decoding unit 20 reads all data and subsequently abandons data judged to be unnecessary in performing data decode for a particular mode. The reading and decoding of the extraneous data takes a significant processing time. There is another problem in displaying images naturally in case of the fast play mode because the load caused by reading and recording the unnecessary data through the memory interface unit limits the data input speed of the decoder.